package com.hb0730.boot.admin.modules.sci.model.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.time.LocalDateTime;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 科研纵向结项验收表
 * @TableName sci_ver_finish
 */
@TableName(value ="sci_ver_finish")
@Data
public class SciVerFinish implements Serializable {
    /**
     * id
     */
    @TableId(type = IdType.ASSIGN_ID)
    private String id;

    /**
     * 填报者
     */
    private String nickname;

    /**
     * 工号
     */
    private String username;

    /**
     * 院系部门
     */
    private String department;

    /**
     * 项目名称
     */
    private String title;

    /**
     * 项目编号
     */
    private String proNumber;

    /**
     * 项目来源
     */
    private String proSource;

    /**
     * 项目级别
     */
    private String level;

    /**
     * 项目类别
     */
    private String type;

    /**
     * 项目下达部门
     */
    private String proDep;

    /**
     * 主持人
     */
    private String firstAuthor;

    /**
     * 其他作者
     */
    private String otherAuthor;

    /**
     * 结项时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDateTime appTime;

    /**
     * 业绩点
     */
    private String point;

    /**
     * 科研奖金
     */
    private String bonus;

    /**
     * 项目路径
     */
    private String path;

    /**
     * 项目状态
     */
    private Integer satus;

    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime modified;

    /**
     * 备注
     */
    private String remark;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        SciVerFinish other = (SciVerFinish) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getNickname() == null ? other.getNickname() == null : this.getNickname().equals(other.getNickname()))
            && (this.getUsername() == null ? other.getUsername() == null : this.getUsername().equals(other.getUsername()))
            && (this.getDepartment() == null ? other.getDepartment() == null : this.getDepartment().equals(other.getDepartment()))
            && (this.getTitle() == null ? other.getTitle() == null : this.getTitle().equals(other.getTitle()))
            && (this.getProNumber() == null ? other.getProNumber() == null : this.getProNumber().equals(other.getProNumber()))
            && (this.getProSource() == null ? other.getProSource() == null : this.getProSource().equals(other.getProSource()))
            && (this.getLevel() == null ? other.getLevel() == null : this.getLevel().equals(other.getLevel()))
            && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
            && (this.getProDep() == null ? other.getProDep() == null : this.getProDep().equals(other.getProDep()))
            && (this.getFirstAuthor() == null ? other.getFirstAuthor() == null : this.getFirstAuthor().equals(other.getFirstAuthor()))
            && (this.getOtherAuthor() == null ? other.getOtherAuthor() == null : this.getOtherAuthor().equals(other.getOtherAuthor()))
            && (this.getAppTime() == null ? other.getAppTime() == null : this.getAppTime().equals(other.getAppTime()))
            && (this.getPoint() == null ? other.getPoint() == null : this.getPoint().equals(other.getPoint()))
            && (this.getBonus() == null ? other.getBonus() == null : this.getBonus().equals(other.getBonus()))
            && (this.getPath() == null ? other.getPath() == null : this.getPath().equals(other.getPath()))
            && (this.getSatus() == null ? other.getSatus() == null : this.getSatus().equals(other.getSatus()))
            && (this.getModified() == null ? other.getModified() == null : this.getModified().equals(other.getModified()))
            && (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getNickname() == null) ? 0 : getNickname().hashCode());
        result = prime * result + ((getUsername() == null) ? 0 : getUsername().hashCode());
        result = prime * result + ((getDepartment() == null) ? 0 : getDepartment().hashCode());
        result = prime * result + ((getTitle() == null) ? 0 : getTitle().hashCode());
        result = prime * result + ((getProNumber() == null) ? 0 : getProNumber().hashCode());
        result = prime * result + ((getProSource() == null) ? 0 : getProSource().hashCode());
        result = prime * result + ((getLevel() == null) ? 0 : getLevel().hashCode());
        result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
        result = prime * result + ((getProDep() == null) ? 0 : getProDep().hashCode());
        result = prime * result + ((getFirstAuthor() == null) ? 0 : getFirstAuthor().hashCode());
        result = prime * result + ((getOtherAuthor() == null) ? 0 : getOtherAuthor().hashCode());
        result = prime * result + ((getAppTime() == null) ? 0 : getAppTime().hashCode());
        result = prime * result + ((getPoint() == null) ? 0 : getPoint().hashCode());
        result = prime * result + ((getBonus() == null) ? 0 : getBonus().hashCode());
        result = prime * result + ((getPath() == null) ? 0 : getPath().hashCode());
        result = prime * result + ((getSatus() == null) ? 0 : getSatus().hashCode());
        result = prime * result + ((getModified() == null) ? 0 : getModified().hashCode());
        result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", nickname=").append(nickname);
        sb.append(", username=").append(username);
        sb.append(", department=").append(department);
        sb.append(", title=").append(title);
        sb.append(", proNumber=").append(proNumber);
        sb.append(", proSource=").append(proSource);
        sb.append(", level=").append(level);
        sb.append(", type=").append(type);
        sb.append(", proDep=").append(proDep);
        sb.append(", firstAuthor=").append(firstAuthor);
        sb.append(", otherAuthor=").append(otherAuthor);
        sb.append(", appTime=").append(appTime);
        sb.append(", point=").append(point);
        sb.append(", bonus=").append(bonus);
        sb.append(", path=").append(path);
        sb.append(", satus=").append(satus);
        sb.append(", modified=").append(modified);
        sb.append(", remark=").append(remark);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}